package com.javandad.app.client.project;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.javandad.app.shared.entity.User;
import com.javandad.app.shared.entity.project.Post;
import com.javandad.app.shared.entity.project.Project;
import com.javandad.app.shared.entity.project.ProjectAssoc;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("project")
public interface ProjectService extends RemoteService {
	List<Project> getProjects(String username, int level);

	List<User> getUsers(String projectname, int level);

	boolean createProject(String username, int level, String projectname,
			int type, String description, String plink, String rlink);

	User getUser();

	Post uploadPost(Post post);

	List<Post> downloadPosts(String projectName, String username, int level,
			int count);

	boolean sendParticipationInvitation(String projectName, String username);

	ProjectAssoc getThisAssociationAmongAllIncludingUnconfirmedInvitations(
			String projectName, String text, int participatnigProject);

	boolean removeParticipation(String projectName, String username);

	List<String> getSessionInfo(String projectName);

	Project getProject(String projectName);

	boolean followProject(String projectName, String username, boolean what);

	List<ProjectAssoc> getProjectAssociations(String username, int level);
}
